package org.rslai.tcedit.domain;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 用户信息
 * 
 * @author rslai
 */
@Entity
@Table(name = "t_product_user")
public class ProductUser extends UUIDSupport {

	Product product; // 产品
	User user; // 用户
	Role role; // 角色
	
	public ProductUser() {
	}

	@OneToOne
	@JoinColumn(nullable = false, updatable = false, unique = false)
    public Product getProduct() { return product; }
    public void setProduct(Product product) { this.product = product; }

	@OneToOne
	@JoinColumn(nullable = false, unique = false)
    public User getUser() { return user; }
    public void setUser(User user) { this.user = user; }

	@OneToOne
	@JoinColumn(nullable = false, unique = false)
    public Role getRole() { return role; }
    public void setRole(Role role) { this.role = role; }

}
